<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class Timkiem_giasu extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('display_model');
    }

    function render($path, $data) {
        $this->load->view('user/common/header_view');
        $this->load->view('user/common/head_content_view');
        $this->load->view($path, $data);
        $this->load->view('user/common/tail_content_view');
        $this->load->view('user/common/footer_view');
    }

    public function getTrinhDo($idTrinhDo) {
        //todo
        return 0;
    }

    public function index() {

        $TenThanhVien = $this->input->post('ten');
        $idTrinhDo = $this->input->post('trinhdo'); //1: Cao đẳng ; 2: Đại học ; 3: Thạc Sỹ
        $idGioiTinh = $this->input->post('gioitinh'); //: khong xác định ; 1: Nam ; 2: Nữ
        $TenMonHoc = $this->input->post('cb');
        $this->load->model('timkiem_giasu_model');
        $data = $this->timkiem_giasu_model->index($TenThanhVien, $idTrinhDo, $idGioiTinh, $TenMonHoc);
        $data['data'] = $data;
        //get TrinhDo
        $TrinhDo = $this->timkiem_giasu_model->getTrinhDo();
        $data['TrinhDo']= $TrinhDo;
        //get NganhHoc
        $NganhHoc = $this->timkiem_giasu_model->getNganhHoc();
        $data['NganhHoc']= $NganhHoc;
        //get Monhoc
        $MonHoc = $this->timkiem_giasu_model->getMonHoc();
        $data['MonHoc']= $MonHoc;
        $this->render('timkiem/timkiem_giasu_view', $data);
    }

}

?>
